import Vue from "vue";

import "normalize.css/normalize.css"; // A modern alternative to CSS resets

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import locale from "element-ui/lib/locale/lang/zh-CN"; // lang i18n
import VCharts from "v-charts";

import "@/styles/index.scss"; // global css

import App from "./App";
import router from "./router";
import store from "./store";

import "@/icons"; // icon
import "@/permission"; // permission control
// 自定义表格工具组件

import RightToolbar from "@/components/RightToolbar";
import DictTag from "@/components/DictTag";

import goodListFrom from "@/components/goodList/goodsListForm";
import userListFrom from "./components/userList/userFrom";
import { getDictData, dictTypeFun } from "@/utils/dict";

import { pickerOptions, authDate } from  '@/utils/date'

Vue.prototype.$pickerDateOptions = pickerOptions;
Vue.prototype.$authDate = authDate;

import btnPer from "./utils/permissonOptions";

Vue.prototype.$btnPer = btnPer;

Vue.use(goodListFrom);
Vue.use(userListFrom);
Vue.component("RightToolbar", RightToolbar);
Vue.component("DictTag", DictTag);
ElementUI.Dialog.props.closeOnClickModal.default = false
ElementUI.Dialog.props.closeOnPressEscape.default = false
ElementUI.MessageBox.setDefaults({
  closeOnClickModal: false
})
ElementUI.Drawer.props.wrapperClosable.default = false
Vue.use(ElementUI, { locale });
Vue.use(VCharts);
Vue.prototype.$getDictData = getDictData;
Vue.prototype.$dictTypeFun = dictTypeFun;
Vue.config.productionTip = false;
import "./utils/btnpermisson";

import vuescroll from 'vue-scroll';
Vue.use(vuescroll);
new Vue({
  el: "#app",
  router,
  store,
  template: "<App/>",
  components: { App }
});
